package com.jd.service.impl;

import com.jd.domain.Order;
import com.jd.mapper.OrderMapper;
import com.jd.service.IOrderService;
import com.jd.util.MybatisUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class OrderServiceImpl implements IOrderService {
    @Override
    public List<Order> findAllOrderAndUser() {
        SqlSession sqlSession = MybatisUtils.openSession();
        OrderMapper mapper = sqlSession.getMapper(OrderMapper.class);
        List<Order> allOrderAndUser = mapper.findAllOrderAndUser();
        return allOrderAndUser;

    }
}
